sox: Input and Output rates must be different to use resample effect

chris (2006-09-30 11:31:26)
6263 views
0 replies
The Asterisk doc says that to convert wav to gsm, you just need to run the following:
$ sox foo.wav -r 8000 foo.gsm resample -ql 

However, sometimes this does with the following error:

sox: Input and Output rates must be different to use resample effect

I have seen people panicking about this, but it's just because the source files have been recorded at 8KHz, which is the same as the resample rate specified in the sox command. Sox is just saying 'I can't apply my resampling algo, because the output rate is the same as the input rate".

This is eaily overcome just by removing the resample statement on the end:
$ sox foo.wav -r 8000 foo.gsm

That's it. Now you're ready to go..

christo
comment